﻿@model mvc_monday.Models.EmployeeIndexVm
@{
    ViewBag.Title = "Home Page";
}
<div>
    @Html.Partial("login", Model.LoginVm)
</div>
<hr />
<div class="jumbotron">
    <h1>@Model.WelcomeMessage</h1>

    var dago = Dataholder.DaysAgo(xDateCreadetd) 
   
    @Html.Partial("area51", Model.PartialVm)
</div>

<div class="row">
    <div class="col-md-4">
        <h2>Employees:</h2>
        <div>
        @foreach(var x in Model.MyEmployees){
           
            <div>
                @{var tname = x.FirstName + " " + x.LastName;}
                @Html.ActionLink(tname, "Details", "Home", new { id = x.EmployeeId }, new { @class = "btn btn-primary" })
            </div>
          }
        </div>
    </div>

    <div class="col-md-4">
        <h2>Managers:</h2>
        <div>
            @foreach (var x in Model.MyEmployees.OfType<mvc_monday.Models.Manager>())
            {
                <div>@x.FirstName</div>
            }
        </div>
    </div>
    <div class="col-md-4">
        <h2>Supervisors:</h2>
        <div>
            @foreach (var x in Model.MyEmployees.OfType<mvc_monday.Models.Supervisor>())
            {
                <div>@x.FirstName</div>
            }
        </div>
    </div>
</div>